<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button style="position:absolute;">你快来点击我呀</button>
        
    <script>
        var btn = document.querySelector('button');
        btn.onmouseover = function(){
            var x = Math.random() * 400;
            var y = Math.random() * 300;
            btn.style.left = x;
            btn.style.top = y; 
        }
    </script>
</body>
</html>